import React, { Component } from 'react';
import {Spin} from 'antd';
// 引入css
import '../assets/css/Loading.css'
class Loading extends Component {
    // 该组件中的spining和tip根据场景设置为动态属性
    // 若没传属性，定义默认参数
    static defaultProps={
        spining:true,
        tip:'加载中...'
    }
    render() {
        return (
            <div className='loading'>
           <Spin size='large' spinning={this.props.spining} tip={this.props.tip} />
            </div>
        );
    }
}

export default Loading;
